import { ITodoData } from "../typing";

class TodoTemplate {

    protected todoView(todo: ITodoData): string {
        const { id, content, completed } = todo
        return `
            <input type="checkbox" data-id="${id}" ${completed ? 'checked' : ''} />
            <span style="text-decoration : ${completed ? 'line-through' : 'none'}"> ${content}</span>
            <button data-id="${id}">删除</botton>
        `
    }
}

export {
    TodoTemplate
}